home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #6
/
Amiga Plus CD - 1996 - No. 06.iso
/
pd
/
grafik
/
imageengineerv3.1
/
extra
/
dopus5
/
arexx
/
ie_import.dopus5
< prev
Wrap
Text File
|
1996-07-14
|
2KB
|
76 lines
/*
** $VER: IE_Import.dopus5 1.0 (13/7 Stockholm/Sweden)
** Copyright © 1996 by Patrik M Nydensten
**
** Imports all selected image files in the SRCE directory into IE.
** Requires Image Engineer 3.0 or higher and DOpus 5.0 or higher.
** Call: (AREXX) DOpus5:arexx/IE_Import.dopus5 {Qp}
*/
options results
lf='0a'x
parse arg portname
if left(portname,5)='DOPUS' then address value portname
else exit
if ~show(ports,'IMAGEENGINEER') then do
dopus request '"Could not locate IEs arexx port!" OK'
exit
end
lister query source /* get source handler */
handle = result
if RC~= 0 then exit
lister query handle selfiles ':' /* get selected file names */
sel_files = result
lister query handle numselfiles /* get number of selected files */
num_files = result
if num_files = 0 then exit
lister query handle path /* get current file path */
file_path = strip(result,B,'"')
lister set handle progress num_files 'Importing images...'
do i = 1 to num_files /* load loop */
address value portname
parse var sel_files image_file ':' sel_files
image_file = strip(image_file,B,'"')
lister set handle progress name image_file /* update progress display */
lister query handle abort /* check if aborted */
if result then do
lister clear handle progress /* exit progress display mode */
lister refresh handle 'full' /* update lister display */
dopus request '"User aborted..." OK'
lister clear handle abort
exit
end
address 'IMAGEENGINEER'
'OPEN' '"'||file_path||image_file||'"' 'COLOUR'
if (RC ~= 0) then do
address value portname
dopus request '"Failed to load image' image_file 'into IE!" OK'
end
else do
address value portname
lister select handle image_file off /* delselect file if used */
end
address value portname
lister set handle progress count i /* update progress display */
lister refresh handle full /* update lister display */
end /* end of load loop */
lister clear handle progress /* exits progress display mode */
lister refresh handle full /* update lister display */
exit